import 'package:flutter/material.dart';

class errorPage extends StatefulWidget {
  final code;
  errorPage(this.code);
  @override
  _errorPageState createState() => _errorPageState(this.code);
}

List errorList = ["Page under construction"];

class _errorPageState extends State<errorPage> {
  final code;
  _errorPageState(this.code);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        iconTheme: IconThemeData(
          color: Colors.grey,
        ),
        centerTitle: true,
        title: Text(
          "Error!",
          style: TextStyle(color: Colors.black),
        ),
        elevation: 0,
        backgroundColor: Colors.white,
      ),
      body: Center(
        child: Container(
          width: MediaQuery.of(context).size.width,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Text(
                "${errorList[this.code]}",
                textScaleFactor: 2.0,
              ),
              Text(
                "\n Error code:${this.code}",
                textScaleFactor: 2.0,
              )
            ],
          ),
        ),
      ),
    );
  }
}
